package com.banzhi.shop.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2018/8/1.
 */

public class GroupingProfitAdapter extends FragmentPagerAdapter {
    private List<String> title2;
    private List<Fragment> views2;


    public GroupingProfitAdapter(FragmentManager fm, List<String> title, List<Fragment> views) {
        super(fm);
        this.title2 = title;
        this.views2 = views;
    }
    @Override
    public Fragment getItem(int position) {
        return views2.get(position);
    }

    @Override
    public int getCount() {
        return views2.size();
    }
    //配置标题的方法
    @Override
    public CharSequence getPageTitle(int position) {
        return title2.get(position);
    }
}
